package br.com.carrosvale.model.entity.util;

import java.security.MessageDigest;

import sun.misc.BASE64Encoder;

public class SenhaUtil {

	public static String encripta(String senha){
        try {     
            MessageDigest digest = MessageDigest.getInstance("MD5");      
            digest.update(senha.getBytes());      
            BASE64Encoder encoder = new BASE64Encoder ();      
            return encoder.encode (digest.digest ());      
       } catch (Exception ns) {     
            return senha;      
       }		
	}
	
}
